﻿' 
' Copyright (C) 2014 Infinity CCS Ltd (http://www.infinityccs.com/)
' Copyright (C) 2008 Sasa Coh <sasacoh@gmail.com>
'
' This program is free software; you can redistribute it and/or modify
' it under the terms of the GNU General Public License as published by
' the Free Software Foundation; either version 3 of the License, or
' (at your option) any later version.
'
' This program is distributed in the hope that it will be useful,
' but WITHOUT ANY WARRANTY; without even the implied warranty of
' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
' GNU General Public License for more details.
'
' You should have received a copy of the GNU General Public License
' along with this program.  If not, see <http://www.gnu.org/licenses/>. 
'/


Imports System
Imports Infinity.pjsipNET.Common.Media
Imports Infinity.pjsipNET.Common.Config


Namespace Common.CallState
  ''' <summary>
  ''' General state machine interface. 
  ''' </summary>
  Public MustInherit Class IStateMachine
#Region "Public Methods"
    Public MustOverride Sub Destroy()
    Public MustOverride ReadOnly Property IsNull As Boolean
#End Region

#Region "Public Properties"
    'Public MustOverride Property AccountKey As String
    Public MustOverride Property CallingName As String
    Public MustOverride Property CallingNumber As String
    Public MustOverride Property DDI As String
    Public MustOverride Property Incoming As Boolean
    Public MustOverride Property Is3Pty As Boolean
    Public MustOverride Property IsHeld As Boolean
    Public MustOverride Property SessionId As Integer
    Public MustOverride Property AccountId As Integer
    Public MustOverride Property Line As Integer
    Public MustOverride ReadOnly Property RuntimeDuration As TimeSpan
    Public MustOverride Property Duration As TimeSpan
    Public MustOverride ReadOnly Property StateId As EStateId
    Public MustOverride ReadOnly Property Codec As String
    Friend MustOverride Property DisableStateNotifications As Boolean
    Friend MustOverride ReadOnly Property NumberOfCalls As Integer
    Public MustOverride Property LastStatus As Integer
    Public MustOverride Property LastStatusText As String
#End Region

#Region "Internal Methods"

    Friend MustOverride Sub ChangeState(stateId As EStateId)
    Friend MustOverride Function StartTimer(ttype As Timer.ETimerType, numDelay As Integer) As Boolean
    Friend MustOverride Function StopTimer(ttype As Timer.ETimerType) As Boolean
    Friend MustOverride Sub StopAllTimers()
    Friend MustOverride Sub ActivatePendingAction()

#End Region

#Region "Internal Properties"
    Friend MustOverride ReadOnly Property State As IState
    Friend MustOverride Property RetrieveRequested As Boolean
    Friend MustOverride Property HoldRequested As Boolean
    Friend MustOverride ReadOnly Property CallProxy As ICallProxy
    Friend MustOverride ReadOnly Property Config As IConfigurator
    Friend MustOverride ReadOnly Property MediaProxy As IMediaProxy
    Friend MustOverride Property Type As CallLog.ECallType
    Friend MustOverride Property Time As DateTime
    Friend MustOverride Property Counting As Boolean
#End Region

  End Class
End Namespace
